/*
 * Copyright (c) 2013 XDream
 * Copyright (c) 2013 bruceshu <shuhuan.bruce@gmail.com>
 * 2024-9-19
 */

#ifndef FFMPEG_VIDEO_DECODER_H
#define FFMPEG_VIDEO_DECODER_H

#include "video_common_define.h"
#include "video_decoder.h"

#ifdef __cplusplus
extern "C" {
#endif

#include "libavcodec/avcodec.h"
#include "libavutil/dict.h"

#ifdef __cplusplus
}
#endif


namespace mydecoder {


class FfmpegVideoDecoder : public VideoDecoder
{
private:
    AVCodecContext *m_codecCtx;
public:
    FfmpegVideoDecoder(/* args */);
    ~FfmpegVideoDecoder() override;

    virtual VideoCodecError init(const AVBuffer *buffer) override;
    virtual VideoCodecError decode() override;
    virtual void flush() override;

    // VideoCodecError getDelayedFrame() override;
    // VideoCodecError setHardwareContext(HardwareContext *context) override;
    // VideoCodecError setSkipFrame(int skip_frame) override;


};

}



#endif